define(function(require, exports, module) {
	'use strict';
    

    (function () {
        var ctrlNum = 5;
        $.widget('rk.wrStatistics_' + ctrlNum + 'PopupCtrl', $.rk.wrStatisticsPopupCtrl, {
            _create: function () {
                var me = this;
                var elem = me.element;
            },
            _init: function () {
                var me = this;
                me._super();
            },
            _handleData: function (data) {
                var me = this;
                var elem = me.element;

                var contractAmounts = data.contractAmounts;
                if (contractAmounts.length > 0)contractAmounts[contractAmounts.length - 1].isLast = true;
                for (var i = 0, len = contractAmounts.length; i < len; i++) {
                    var entity = contractAmounts[i];
                    entity.amountText = numeral(entity.amount).format('0,0') + workreportService.getCurrencyUnit();
                }

                return data;
            }
        });
    })()

});
